//==============================================================================
//
// Title:		channel.h
// Purpose:		A short description of the interface.
//
// Created on:	2018/6/28 at 10:01:41 by .
// Copyright:	. All Rights Reserved.
//
//==============================================================================

#ifndef __channel_H__
#define __channel_H__

#ifdef __cplusplus
    extern "C" {
#endif

//==============================================================================
// Include files

#include "cvidef.h"
#include "NIDAQmx.h"

//==============================================================================
// Constants
		
#define CHANNEL_MODE_RSE  0
#define CHANNEL_MODE_NRSE 1
#define CHANNEL_MODE_DIFF 2

//==============================================================================
// Types
		
typedef unsigned char  uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int   uint32_t;
typedef unsigned long  cvi_color_t;

typedef struct {
	uint8_t enabled;
	uint8_t index;
	uint8_t mode;
	cvi_color_t color;
	char name[40];
} Channel_t;

typedef struct {
	float64 min;
	float64 max;
	float64 freq;
	uInt32  readNumber;
} ChannelSetting_t;

//==============================================================================
// External variables

//==============================================================================
// Global functions

int32 Channel_TerminalConfig(uint8_t);

#ifdef __cplusplus
    }
#endif

#endif  /* ndef __channel_H__ */
